package com.widget.collection;

import com.google.common.collect.Maps;
import java.util.Map;

/**
 * 来源： https://github.com/google/guava
 *
 * @author mlliud
 * @date 2020/7/28 6:14 下午
 */
public class MapHelper {

  private static void doc() {
    /**
     * map中没有key返回默认值
     */
    Map<String, String> datas = Maps.newHashMap();
    String orDefault = datas.getOrDefault("key", "val991");
  }

  public static void main(String[] args) {
    MapHelper.doc();
  }
}
